package chixing.day06.homework;

public class StudentTest {
    public static void main(String[] args) {
        /**
         *内存中的执行过程
         * 1.创建对象 new 开辟一块堆内存
         * 在栈中存放对象的名称
         * 在堆中存放对象属性
         * 初始化属性
         * 调用构造函数方法体
         *栈中的student对象名称指向堆内存
         */
   Student student = new Student();
   student.setStuId(1);
   student.setStuName("小王");
   student.setStuGender('男');
   Student student1 = new Student(2,'男',"小亏");
   System.out.println(student1.getStuId() + " " + student1.getStuName() + " " + student1.getStuGender());
   student1.study();
   student1.playGame();
    }

}
